﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        private string measureSet;
        private string colorSet;
        private List<string> measureSets;
        private List<string> colorSets;
        private string file;

        public Form1()
        {
            InitializeComponent();
            panel1.Visible = true;
            panel2.Visible = false;
            panel3.Visible = false;
            panel4.Visible = false;
            panel5.Visible = false;
            measureSets = new List<string> { "mes set 1", "mes set 2", "mes set 3" };
            colorSets = new List<string> { "col set 1", "col set 2", "col set 3", "col set 4" };
            measureSet = measureSets.ElementAt(0);
            colorSet = colorSets.ElementAt(0);
            label12.Visible = false;

        }





        private void button1_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            panel2.Visible = true;
            textBox1.Text = measureSet;
            textBox2.Text = colorSet;
            label12.Visible = false;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            panel2.Visible = false;
            panel5.Visible = true;
            textBox12.Text = measureSet;
            textBox11.Text = colorSet;
        }

        private void button11_Click(object sender, EventArgs e)
        {
            panel1.Visible = true;
            panel2.Visible = false;
            button4.Text = "Take a photo";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            panel3.Visible = true;
            listBox1.DataSource = measureSets;
            listBox2.DataSource = colorSets;
            textBox3.Text = colorSet;
            textBox4.Text = measureSet;
            label12.Visible = false;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            panel3.Visible = false;
            panel4.Visible = true;
            label11.Text = "Measure set:";
            textBox5.Text = measureSet;
            textBox6.Text = "Item 1 \r\n info: \r\n\r\n Lenght : 17cm \r\n File : " + file + "1";
            textBox7.Text = "Item 2 \r\n info: \r\n\r\n Lenght : 457cm \r\n File : " + file + "1";
            textBox8.Text = "Item 3 \r\n info: \r\n\r\n Lenght : 199cm \r\n File : " + file + "2";

        }

        private void button7_Click(object sender, EventArgs e)
        {
            panel3.Visible = false;
            panel4.Visible = true;
            label11.Text = "Color set:";
            textBox5.Text = colorSet;
            textBox6.Text = "Item 1 \r\n info: \r\n\r\n Color : hue : 125 \r\n chroma : 0.3\r\n light : 0.3 \r\n File : " + file + "1";
            textBox7.Text = "Item 2 \r\n info: \r\n\r\n Color : hue : 225 \r\n chroma : 0.1\r\n light : 0.15 \r\n File : " + file + "2";
            textBox8.Text = "Item 3 \r\n info: \r\n\r\n Color : hue : 100 \r\n chroma : 0.1\r\n light : 0.3 \r\n File : " + file + "2";
        }

        private void button8_Click(object sender, EventArgs e)
        {
            measureSet = (string)listBox1.SelectedItem;
            textBox4.Text = measureSet;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            colorSet = (string)listBox2.SelectedItem;
            textBox3.Text = colorSet;
        }

        private void button12_Click(object sender, EventArgs e)
        {
            panel3.Visible = false;
            panel1.Visible = true;
        }

        private void button13_Click(object sender, EventArgs e)
        {
            panel4.Visible = false;
            panel3.Visible = true;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            label12.Visible = true;
        }


        private void button14_Click(object sender, EventArgs e)
        {
            panel5.Visible = false;
            panel2.Visible = true;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(textBox9.Text))
            {
                measureSets.Add(textBox9.Text);
                listBox1.DataSource = null;
                listBox1.DataSource = measureSets;
                textBox9.Text = "";
            }
        }

        private void button10_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(textBox13.Text))
            {
                colorSets.Add(textBox13.Text);
                listBox2.DataSource = null;
                listBox2.DataSource = colorSets;
                textBox13.Text = "";
            }
        }

        private void button16_Click(object sender, EventArgs e)
        {
            textBox10.Text = "Line lenght : 34cm \r\nFile: " + file + "1";
            label18.Text = "Draw a line";
        }

        private void button15_Click(object sender, EventArgs e)
        {
            textBox10.Text = "Color : \r\n hue : 125 \r\n chroma : 0.3 \r\n light : 0.3 \r\nFile: " + file + "1";
            label18.Text = "Press on the Photo";
        }

        private void button18_Click(object sender, EventArgs e)
        {

        }


        private void button17_Click_1(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(textBox14.Text))
                file = textBox14.Text;
        }

       

        
        void Button15Click(object sender, EventArgs e)
        {
        	 textBox10.Text = "Color : \r\n hue : 125 \r\n chroma : 0.3 \r\n light : 0.3 \r\nFile: " + file + "1";
            label18.Text = "Press on the Photo";
        }
        
        void Panel5Paint(object sender, PaintEventArgs e)
        {
        	
        }
    }
}
